﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainTemplate.master" AutoEventWireup="true" CodeFile="Detail.aspx.cs" Inherits="Detail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TC_Head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="TC_MainContent" Runat="Server">

    <!-- Contents Start -->
        <div class="contents">
            <div class="custom-container">

                <div class="row">

                    <!-- Content Column Start -->
                    <div class="col-lg-8 col-md-7 col-sm-12 col-xs-12 equalcol conentsection">

                        <div class="row">
                        
                <%
                    if (subject != null && subject.Count != 0)
                    {                       
                        string title = subject["Title"].ToString().Trim();
                        int like = int.Parse(subject["TotalLike"].ToString().Trim());
                        int view = int.Parse(subject["TotalView"].ToString().Trim());
                        int comment = int.Parse(subject["TotalComment"].ToString().Trim());                        
                        string description = subject["Description"].ToString().Trim();
                        
                %>
                            <div class="col-lg-11 col-md-11 col-sm-12 col-xs-12">
                                    <div class="videobox2 ">
                                        <div class="text title-def">
                                            <h2><a href="javascript:;"><%=title %></a></h2>
                                        </div>

                                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 videoinfo" style="margin-top: 10px;margin-bottom:0px;padding: 0px 0px 0px 0px; ">
                                            <div class="row">
                                                <!-- Uploader Start -->
                                                <div class="col-lg-5 col-md-4 col-sm-4 col-xs-12 uploader">
                                                    <figure> <a href="#"><img src="<%=baseHost %>images/avatar2.jpg" alt=""/></a> </figure>
                                                    <div class="aboutuploader">
                                                        <h5><a href="#">Hoàng Sang Phan</a></h5>
                                                        <time datetime="25-12-2014">10 phút trước</time>
                                                        <br/>
                                                        <a class="btn btn-primary btn-xs backcolor" href="#">Xem tất cả</a>
                                                    </div>
                                                </div>
                                                <!-- Uploader End -->
                                                <!-- Video Stats Start -->
                                                <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12 stats">
                                                    <hr class="visible-xs"/>
                                                    <ul>
                                                        <li class="likes">
                                                            <h5>Likes</h5>
                                                            <h2><%=ThapCam.Ulti.FOUtility.formatNumber(like) %></h2>
                                                        </li>
                                                        <li class="views">
                                                            <h5>Views</h5>
                                                            <h2><%=ThapCam.Ulti.FOUtility.formatNumber(view) %></h2>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <!-- Video Stats End -->
                                                <!-- Video Share Start -->
                                                <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 videoshare">
                                                    <ul>
                                                        <li class="facebook">
                                                            <i class="fa fa-facebook"></i>
                                                            <div class="shaingstats">
                                                                <h5>36K</h5>
                                                                <p>Shares</p>
                                                            </div>
                                                            <a href="http://www.facebook.com/" class="link" target="_blank"></a>
                                                        </li>
                                                        <li class="twitter">
                                                            <i class="fa fa-twitter"></i>
                                                            <div class="shaingstats">
                                                                <h5>15K</h5>
                                                                <p>Tweets</p>
                                                            </div>
                                                            <a href="http://www.twitter.com/" class="link" target="_blank"></a>
                                                        </li>
                                                        <li class="gplus">
                                                            <i class="fa fa-google-plus"></i>
                                                            <div class="shaingstats">
                                                                <h5>7K</h5>
                                                                <p>Shares</p>
                                                            </div>
                                                            <a href="https://plus.google.com/" class="link" target="_blank"></a>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <!-- Video Share End -->                                            
                                            </div>

                                       
                                        </div>

                                    
                                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 0px 0px 0px 0px; ">
                                            <div class="clearfix">
                                                <a href="javascript:;" class="btn btn-default btn-success alignright">Xem Tiếp &nbsp;<i class="fa fa-arrow-right"></i></a>    

                                                <a href="javascript:;" class="btn btn-default btn-info"><i class="fa fa-arrow-left"></i>&nbsp;Trước Đó </a> 


                                            </div>
                                        </div>
                                  
                                        <figure>
                                            <a href="#">
                                                <img src="<%=baseHost %>images/img1-big.jpg" class="img-responsive hovereffect" alt="" />
                                            </a>
                                        </figure>

                                    </div>
                               
                                </div>
                            <div class="clearfix"></div>
                           
                            <div class="col-lg-11 col-md-11 col-sm-12 col-xs-12">
                                <hr />
                                <h2 class="heading">Bình Luận (<%=comment %>)</h2>
                                <div class="bg-warning" style="height:500px"></div>
                            </div>
                <%
                    }
                %>                            
                        </div>
                        <div class="clearfix"></div>

                    </div>
                    <!-- Content Column End -->

                    <!-- Gray Sidebar Start -->
                    <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12 equalcol graysidebar pull-right">
                        
                        <div class="row">

                            <!-- Interactive Tabs Widget start -->
                            <div class="widget">
                                <h2><i class="fa fa-star"></i> Cười Ngất Ngây</h2>
                                
                                <%
                                if (listHot != null && listHot.Rows.Count != 0)
                                {
                                    string title = "", link = "", image = "", iconPlay = "" ;
                                    int  id =0, type=0, view=0, comment=0, like = 0;
                                    int count = 0;
                                    foreach (System.Data.DataRow row in listHot.Rows)
                                    {
                                        count++;
                                        id = int.Parse(row["ID"].ToString().Trim());
                                        title = row["Title"].ToString().Trim();
                                        type = int.Parse(row["TypeSubject"].ToString().Trim());
                                        view = int.Parse(row["TotalView"].ToString().Trim());
                                        comment = int.Parse(row["TotalComment"].ToString().Trim());                               
                                        like = int.Parse(row["TotalLike"].ToString().Trim());

                                        link = getLinkByType(id, type);
                                        image = resourceHost + row["ImagePath"].ToString().Trim();
                                        if (type == 2)
                                            iconPlay = "<a href=\""+link+"\" class=\"playicon\"><i class=\"fa fa-play-circle-o\"></i></a>";
                                        else
                                            iconPlay="";
                                        if (count % 6 == 0)
                                        {
                                %>
                                            <div class="videobox2 blogposttwo">
                                                <figure>
                                                    <div class="text">
                                                        <a href="javascript:;">
                                                            <img src="<%=baseHost %>images/adv2.gif" class="img-responsive hovereffect" alt=""/>
                                                        </a>
                                                    </div>
                                                </figure>
                                            </div>
                                <%
                                        }
                                        else
                                        {
                                %>
                                            <!-- Video Box Start -->
                                            <div class="videobox2 blogposttwo">
                                                <figure>
                                                    <div class="text content-limit">
                                                        <a href="<%=link %>">
                                                            <img class="img-responsive hovereffect" src="<%=image %>" alt="<%=title %>"/>
                                                        </a>
                                                    </div>
                                                    <div class="vidopts">
                                                        <ul>
                                                            <li><i class="fa fa-clock-o"></i>12:23</li>
                                                        </ul>
                                                        <div class="clearfix"></div>
                                                    </div>
                                                   <%=iconPlay %>
                                                </figure>
                                                <h5><a href="<%=link %>"><%=title %></a></h5>
                                            </div>
                                            <!-- Video Box End -->
                                            <div class="clearfix"></div>  
                                <%                                                                                                        
                                        }                           
                                    } 
                                }
                            %>

                            </div>

                            <div class="clearfix"></div>
                            <!-- Interactive Tabs Widget End -->                            
                            <hr />

                            <!-- Recent Post Widget start -->
                            <div class="widget">
                                <p class="text-center">
                                     <%=ThapCam.System.ThapCamLogic.properties["FooterMenu"].ToString()%>                                    
                                </p>
                                <p class="text-center copyrights">© 2014. All rights reserved</p>
                            </div>
                            <div class="clearfix"></div>
                            <!-- Recent Post Widget end -->
                        </div>

                    </div>
                    <!-- Gray Sidebar End -->

                </div>

            </div>
        </div>
        <!-- Contents End -->


</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="TC_Bootom" Runat="Server">

    <script type="text/javascript" src="<%=baseHost %>js/thapcam.whatview.min.js"></script>
               
    <script type="text/javascript" src="<%=baseHost %>js/functions.js"></script>

</asp:Content>

